package com.jaychen.eureka.client;

import com.jaychen.eureka.client.config.EurekaClientProperties;
import com.jaychen.eureka.client.init.ApplicantsInitialized;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author Jay Chen
 * @Date 2020/10/26 11:15
 */
@Configuration
@EnableConfigurationProperties({EurekaClientProperties.class})
@ConditionalOnProperty(prefix = "jaychen", value = "enable", matchIfMissing = true)
public class AutoConfiguration {

    @Bean
    public ApplicantsInitialized applicantsInitialized () {
        return new ApplicantsInitialized();
    }

}
